{% extends "root_base.html" %}{% block content_root_base %}
	<form id="form_addpost" action="" method="post">
		<div id="miaoshu_title_addpost" class="sided"><strong>标题：</strong></div>
		<div id="title_addpost_root_base"><input type="text" name="post_title" value="{{ article.title }}" id="textform_addpost_root_base" size="70" /></div>
		<div id="toolbar_addpost"><div id="miaoshu_textarea" class="sided"><strong>内容：</strong></div>
		<div class="sided float_right"><a href="javascript:;" onclick="str_replace();"><strong>重置尖括号</strong></a></div>
		<div class="sided float_right"><a href="/{{ article.key.id}}_article.html" target="_blank"><strong>预览</strong></a></div>
		</div>
		<div id="content_addpost_root_base"><textarea name="post_content" id="textarea_addpost_root_base" cols="80" rows="15">{{ article.content }}</textarea></div>
		<div id="list_cate_addpost_root_base"><strong>选择分类：</strong>
			{% for category in categories %}
				{% if category.use %}
					<div><input type="checkbox" checked id="{{ category.key.id }}_select" name="select_categories" value="{{ category.key }}" /><label for="{{ category.key.id }}_select">{{ category.name }}</label></div>
				{% else %}
					<div><input type="checkbox" id="{{ category.key.id }}_select" name="select_categories" value="{{ category.key }}" /><label for="{{ category.key.id }}_select">{{ category.name }}</label></div>
				{% endif %}
			{% endfor %}
		</div>
		<iframe name="form_upload_file" id="form_upload_file" frameBorder="0" src="/upload_file_root.html"></iframe>
		<div id="submit_addpost_root_base">
			<input type="hidden" value="{{ article.key.id }}" name="id_article_hidden" />
			<div class="float_left"><select name="save_type" id="select_addpost_root_base">
				{% ifequal article.article_type 'article' %}
				<option value="draft">草稿</option>
				<option selected value="article">文章</option>
				<option value="page">页面</option>
				{% else %}{% ifequal article.article_type 'page' %}
				<option value="draft">草稿</option>
				<option value="article">文章</option>
				<option selected value="page">页面</option>
				{% else %}
				<option selected value="draft">草稿</option>
				<option value="article">文章</option>
				<option value="page">页面</option>
				{% endifequal %}{% endifequal %}
			</select></div>
			<div class="float_right"><input id="button_submit_addpost_root_base" type="submit" value="发布" /></div>
		</div>
	</form>
{% endblock %}
